<?php
$id = isset($_GET['id'])?$_GET['id']:'cctv1hd';
$accesstoken = 'R60D35BAAU30912182K776AE004ICC9166B4PBM323D35AV1020DZ9C465W168B41AC189827EC';
//备用sccesstoken：R5ECA3A64U3191B163K776AAA45I98525ADEPBM3238581V0Z9C465W1611EBE7BE3AEBED、R5E527FBEU319AC163K7768D0EEI59A8C401PBM321BC1AV0Z9C465W15F60B7EBB17EFE8、R5EDED88FU30990082K776ABB09I32F98767PBM323A1A7V0Z9C465W1616B8D311E6D9E9
$playtoken = array('31649KBRUYVTKBX10','31648YBGNZQKEGQ10');
$n = array(
    'cctv1hd' => '119', //CCTV1HD
    'cctv2hd' => '137', //CCTV2HD
    'cctv3hd' => '129', //CCTV3HD
    'cctv5hd' => '130', //CCTV5HD
    'cctv5phd' => '120', //CCTV5+HD
    'cctv6hd' => '131', //CCTV6HD
    'cctv7hd' => '138', //CCTV7HD
    'cctv8hd' => '132', //CCTV8HD
    'cctv9hd' => '139', //CCTV9HD
    'cctv10hd' => '140', //CCTV10HD
    'cctv11' => '011', //CCTV11
    'cctv12hd' => '141', //CCTV12HD
    'cctv13' => '013', //CCTV13
    'cctv13hd' => '274', //CCTV13HD
    'cctv14' => '015', //CCTV14
    'cctv14hd' => '142', //CCTV14HD
    'cctv15' => '060', //CCTV15
    'zyxy_zxs' => '065', //中样新影-中学生
    'cgtn' => '058', //CGTN
    'cetv1' => '061', //CETV1
    'cetv1hd' => '220', //CETV1HD
    'cetv4' => '221', //CETV4
    'bjws' => '030', //北京卫视
    'dfwshd' => '123', //东方卫视HD
    'tjwshd' => '133', //天津卫视HD
    'cqws' => '033', //重庆卫视
    'hljws' => '047', //黑龙江卫视
    'hljwshd' => '136', //黑龙江卫视HD
    'jlws' => '046', //吉林卫视
    'lnws' => '045', //辽宁卫视
    'lnwshd' => '143', //辽宁卫视HD
    'nmgws' => '042', //内蒙古卫视
    'nxws' => '017', //宁夏卫视
    'gsws' => '035', //甘肃卫视
    'qhws' => '036', //青海卫视
    'snws' => '049', //陕西卫视
    'sxws' => '044', //山西卫视
    'sdwshd' => '134', //山东卫视HD
    'ahws' => '034', //安徽卫视
    'haws' => '048', //河南卫视
    'hbws' => '050', //湖北卫视
    'hbwshd' => '135', //湖北卫视HD
    'hnwshd' => '124', //湖南卫视HD
    'jxws' => '051', //江西卫视
    'jxwshd' => '275', //江西卫视HD
    'jswshd' => '125', //江苏卫视HD
    'zjwshd' => '126', //浙江卫视HD
    'dnws' => '052', //东南卫视
    'gdws' => '053', //广东卫视
    'gdwshd' => '127', //广东卫视HD
    'szws' => '055', //深圳卫视
    'szwshd' => '128', //深圳卫视HD
    'gxws' => '054', //广西卫视
    'ynws' => '040', //云南卫视
    'gzws' => '041', //贵州卫视
    'scwshd' => '198', //四川卫视HD
    'xjws' => '062', //新疆卫视
    'xzws' => '063', //西藏卫视
    'hiws' => '056', //海南卫视
    'btv11' => '043', //北京冬奥纪实
    'btvkaku' => '200', //卡酷少儿
    'bxjk' => '066', //百姓健康
    'zhtc' => '069', //中华特产
    'shdy' => '070', //四海钓鱼
    'hqly' => '074', //环球旅游
    'hqqg' => '093', //环球奇观
    'jshqjx' => '205', //聚鲨环球精选
    'jsqc' => '148', //极速汽车
    'dsjc' => '149', //都市剧场
    'shss' => '151', //生活时尚
    'qjs' => '152', //全纪实
    'jbty' => '153', //劲爆体育
    'mlzq' => '154', //魅力足球
    'xfc' => '155', //幸福彩
    'dmxc' => '156', //动漫秀场
    'yxfy' => '157', //游戏风云
    'lanqiu' => '105', //篮球
    'wlqp' => '103', //网络棋牌
    'xdm' => '104', //新动漫
    'yxjj' => '173', //游戏竞技
    'jygw' => '014', //家有购物
    'jygw_1' => '174', //家有购物
    'nxgg' => '016', //宁夏公共
    'nxjj' => '018', //宁夏经济
    'nxys' => '019', //宁夏影视
    'nxse' => '020', //宁夏少儿
    'nxds' => '022', //宁夏导视
    'nxds_1' => '252', //宁夏导视
    'nxjy' => '026', //宁夏教育
    'yclwzh' => '232', //灵武综合
    'yclwwt' => '233', //灵武文体
    'ychelan' => '257', //贺兰新闻综合
    'ycyongning' => '271', //永宁电视台
    'ycyongning_1' => '272', //永宁电视台
    'wzzh' => '258', //吴忠综合
    'wzgg' => '226', //吴忠公共
    'wzhsb' => '259', //红寺堡电视台
    'wztongxin' => '236', //同心电视台
    'wzyanchi' => '238', //盐池综合
    'wzqtxgg' => '255', //青铜峡公共
    'wzqtxgg_1' => '256', //青铜峡公共
    'zwzh' => '230', //中卫综合
    'zwzh_1' => '253', //中卫综合
    'zwzh_2' => '254', //中卫综合
    'zwznzh' => '228', //中宁综合
    'zwznzh_1' => '229', //中宁综合
    'szszh' => '266', //石嘴山综合
    'szszh_1' => '269', //石嘴山综合
    'szsgg' => '268', //石嘴山公共
    'dztv' => '265', //平罗电视台
    'gygg' => '234', //固原公共
    'gygg_1' => '260', //固原公共
    'gygg_2' => '261', //固原公共
    'gylongde' => '235', //隆德电视台
    'gypengyang' => '262', //彭阳综合
    'gyjingyuan' => '264', //泾源电视台
    'gyxiji' => '263', //西吉综合
    'gyhaiyuan' => '237', //海原综合
    'guoxue' => '073', //国学频道
    'liyuan' => '098', //梨园频道
    'chapd' => '150', //茶频道
    'jykt' => '038', //金鹰卡通
    'liangzhuang' => '068', //靓妆
    'qsjl' => '158' //求索纪录
);

$url = 'http://httpdvb.slave.nx96200.cn:13164/playurl?playtype=live&protocol=hls&verifycode=2003492868&programid=4200900'.$n[$id].'&accesstoken='.$accesstoken.'&playtoken='.$playtoken[mt_rand(0,count($playtoken)-1)].'.m3u8';
//echo $url;
header("location: ".$url);
?>